package com.funwell.server.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 
 * @author sunfangwei
 *  与当前应用相关的配置信息。说明：1、ConfigurationProperties中prefix，为application.yml文件中app定义的值
 */
@ConfigurationProperties(prefix = "app")
@Component
public class AppConfig {

  /**
   * 应用名称
   */
  private String appName;
  /**
   * 应用请求地址
   */
  private String appHost;
  /**
   * H5请求地址
   */
  private String h5Host;
  /**
   * 是否允许跨域
   */
  private Boolean allowCrossDomainAccess;
  /**
   * 是否允许生成API文档
   */
  private Boolean allowGenerateApi;

  /**
   * 环境：dev:开发;test:测试;prod:生产
   */
  private String env;

  public String getAppName() {
    return appName;
  }

  public void setAppName(String appName) {
    this.appName = appName;
  }

  public String getAppHost() {
    return appHost;
  }

  public void setAppHost(String appHost) {
    this.appHost = appHost;
  }

  public String getH5Host() {
    return h5Host;
  }

  public void setH5Host(String h5Host) {
    this.h5Host = h5Host;
  }

  public Boolean getAllowCrossDomainAccess() {
    return allowCrossDomainAccess;
  }

  public void setAllowCrossDomainAccess(Boolean allowCrossDomainAccess) {
    this.allowCrossDomainAccess = allowCrossDomainAccess;
  }

  public Boolean getAllowGenerateApi() {
    return allowGenerateApi;
  }

  public void setAllowGenerateApi(Boolean allowGenerateApi) {
    this.allowGenerateApi = allowGenerateApi;
  }

  public String getEnv() {
    return env;
  }

  public void setEnv(String env) {
    this.env = env;
  }

}
